<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v3.0.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />

<title>用户中心_ECSHOP演示站 - Powered by ECShop</title>
<base href="__STATIC__/Home/">
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="themes/default/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/common.js"></script><script type="text/javascript" src="js/user.js"></script></head>
<body>

{include file='Public/header'}<!-- 引入公共顶部文件 -->
<div class="clear0 "></div>

<div class="block box">
 <div id="ur_here">
  <div class="path"><div>当前位置: <a href=".">首页</a> <code>&gt;</code> 用户中心</div></div> </div>
</div>

<div class="blank"></div>
<div class="block clearfix userpage">
  
  <div class="AreaL">
    <div class="box">
     <div class="box_1">
      <div class="userCenterBox">
{include file='Public/user_menu'}<!-- 引入公共左部文件 -->    
</div>
     </div>
    </div>
  </div>
  
  
  <div class="AreaR">
    <div class="box">
     <div class="box_1">
      <div class="userCenterBox boxCenterList clearfix" style="_height:1%;">

              <h5><span>收货人信息</span></h5>
        <div class="blank"></div>
          <!-- 展示收货地址 -->
             <!-- <form action="{:url('Home/User/address_add')}" method="post" name="theForm"> -->
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tr>
                  <td align="right" bgcolor="#ffffff">配送区域：</td>
                  <td colspan="3" align="left" bgcolor="#ffffff">
                    <select name="country" id="">
                          <option value="">--请选择--</option>
                          <option value=""></option>
                    </select>
                    <select name="country" id="">
                          <option value="">--请选择--</option>
                          <option value=""></option>
                    </select>
                    <select name="country" id="">
                          <option value="">--请选择--</option>
                          <option value=""></option>
                    </select>
                    <select name="country" id="">
                          <option value="">--请选择--</option>
                          <option value=""></option>
                    </select>
                   </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">收货人姓名：</td>
                  <td align="left" bgcolor="#ffffff"><input name="consignee" type="text" class="inputBg" id="consignee_2" value="{$address['consignee']}" />
                  (必填) </td>
                  <td align="right" bgcolor="#ffffff">电子邮件地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_2" value="{$address['email']}" />
                  (必填)</td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">详细地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="address" type="text" class="inputBg" id="address_2" value="{$address['address']}" />
                  (必填)</td>
                  <td align="right" bgcolor="#ffffff">邮政编码：</td>
                  <td align="left" bgcolor="#ffffff"><input name="zipcode" type="text" class="inputBg" id="zipcode_2" value="{$address['zipcode']}" /></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">手机：</td>
                  <td align="left" bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="mobile_2" value="{$address['tel']}" />(必填)</td>
                  <td align="right" bgcolor="#ffffff">备注 :</td>
                  <td align="left" bgcolor="#ffffff"><input name="descr" type="text" class="inputBg" id="tel_2" value="{$address['descr']}" />
                  </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">&nbsp;</td>
                  <td colspan="3" align="center" bgcolor="#ffffff"> 
                  <a href="{:url('Home/User/address_del')}?id={$address['address_id']}" class="bnt_blue_2">删除</a>
                  </td>
                </tr>
              </table>
            <!-- </form> -->
          <!-- 新增 -->
             <form action="{:url('Home/User/address_add')}" method="post" name="theForm">
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tr>
                  <td align="right" bgcolor="#ffffff">配送区域：</td>
                  <td colspan="3" align="left" bgcolor="#ffffff"><select name="country" id="selCountries_2">
                    <option value="">--请选择--</option>
                                     {foreach $data['region'] as $v}
                                            <option value="{$v.region_id}">{$v.region_name}</option>
                                     {/foreach}
                                          </select>
                   </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">收货人姓名：</td>
                  <td align="left" bgcolor="#ffffff"><input name="consignee" type="text" class="inputBg" id="consignee_2" value="" />
                  (必填) </td>
                  <td align="right" bgcolor="#ffffff">电子邮件地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_2" value="" />
                  (必填)</td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">详细地址：</td>
                  <td align="left" bgcolor="#ffffff"><input name="address" type="text" class="inputBg" id="address_2" value="" />
                  (必填)</td>
                  <td align="right" bgcolor="#ffffff">邮政编码：</td>
                  <td align="left" bgcolor="#ffffff"><input name="zipcode" type="text" class="inputBg" id="zipcode_2" value="" /></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">手机：</td>
                  <td align="left" bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="mobile_2" value="" />(必填)</td>
                  <td align="right" bgcolor="#ffffff">备注 :</td>
                  <td align="left" bgcolor="#ffffff"><input name="descr" type="text" class="inputBg" id="tel_2" value="" />
                  </td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">&nbsp;</td>
                  <td colspan="3" align="center" bgcolor="#ffffff">                   
                   <input type="submit" class="bnt_blue_2"  value="新增收货地址"/>
                    <!-- <input type="hidden" name="act" value="act_edit_address" /> -->
                    <!-- <input name="address_id" type="hidden" value="" /> -->
                  </td>
                </tr>
              </table>
            </form>
      </div>
     </div>
    </div>
  </div>
     
</div>
<div class="blank"></div>
{include file='Public/footer'}<!-- 引入公共底部文件 -->

</body>
<script src="jquery.js"></script>
<script>
      $("#selCountries_2").on('change',function(){
          //获取当前改变对象
          var _this = $(this);
          //获取当前对象的值
          var parent_id = _this.val();
          if(parent_id==''){
            _this.nextAll().remove();
            return false;
          }
          $.ajax({
            url:"{:url('Home/User/address_info')}",
            type:'get',
            data:{'parent_id':parent_id},
            dataType:'json',
            success:function(e){
              var arr = e;
              var str = "<select name='province'><option value=''>--请选择--</option>";
              for(var i = 0;i<arr.length;i++)
              {
                // alert(1);
                str = str +'<option value='+arr[i].region_id+'>'+arr[i].region_name+'</option>';
              }
              str+='</select>';
              //在追加之前把后面的节点清楚
              _this.nextAll().remove();
              _this.after(str);
            }
        })
      });

      $(document).on('change','select[name="province"]',function(){
          //获取当前改变对象
          var _this = $(this);
          //获取当前对象的值
          var parent_id = _this.val();
          if(parent_id==''){
            _this.nextAll().remove();
            return false;
          }
          $.ajax({
            url:"{:url('Home/User/address_info')}",
            type:'get',
            data:{'parent_id':parent_id},
            dataType:'json',
            success:function(e){
              // console.log(e)
              var arr = e;
              var str = "<select name='city'><option value=''>--请选择--</option>";
              for(var i = 0;i<arr.length;i++)
              {
                // alert(1);
                str = str +'<option value='+arr[i].region_id+'>'+arr[i].region_name+'</option>';
              }
              str+='</select>';
              //在追加之前把后面的节点清楚
              _this.nextAll().remove();
              _this.after(str);
            }
        })
      });

      $(document).on('change','select[name="city"]',function(){
          //获取当前改变对象
          var _this = $(this);
          //获取当前对象的值
          var parent_id = _this.val();
          if(parent_id==''){
            _this.nextAll().remove();
            return false;
          }
          $.ajax({
            url:"{:url('Home/User/address_info')}",
            type:'get',
            data:{'parent_id':parent_id},
            dataType:'json',
            success:function(e){
              // console.log(e)
              var arr = e;
              var str = "<select name='district'><option value=''>--请选择--</option>";
              for(var i = 0;i<arr.length;i++)
              {
                // alert(1);
                str = str +'<option value='+arr[i].region_id+'>'+arr[i].region_name+'</option>';
              }
              str+='</select>';
              //在追加之前把后面的节点清楚
              _this.nextAll().remove();
              _this.after(str);
            }
        })
      });
</script>
</html>
